using System;

namespace THANHTUNGO.Portal.Components.Helpers
{
    public class HttpUrlBuilder
    {
        public static string BuildUrl(string path, string returnUrl)
        {            
            return path + "?returnUrl=" + returnUrl;
        }
        public static string BuildUrl(string path, int tabID, string returnUrl)
        {
            return path + string.Format("?tabid={0}&returnUrl={1}", tabID, returnUrl);
        }

        public static string BuildUrl(string path, int tabID, int moduleID, string returnUrl)
        {
            return path + string.Format("?tabid={0}&mid={1}&returnUrl={2}", tabID, moduleID, returnUrl);
        }

        public static string BuildUrl(string path, int tabID, int moduleID, int itemID, string returnUrl)
        {
            return path + string.Format("?tabid={0}&mid={1}&itemid={2}&returnUrl={3}", tabID, moduleID, itemID, returnUrl);
        }
    }
}
